This application incorporates by reference Taiwanese application Serial No. 89102364, Filed Feb. 11, 2000.
1. Field of the Invention
The present invention relates to a method and device for solving intermission of streaming data. More particularly, the present invention relates to a method and device for solving intermission of isochronous streaming data in a computer system.
2. Description of Related Art
Computers in this multimedia era are required to transmit various forms of data which include text, audio, and video data. Various forms of data have different requirements for transmission. Text data only require to be transmitted correctly but transmitting in real time is not important. On the other hand, audio and video signals, also called isochronous streaming data, due to the sensitivity of human hearing, has to be transmitted in real time to avoid intermitting the streaming signal.
FIG. 1 depicts a conventional block diagram for data transfer in a computer. Audio data transfer, for example, is controlled by a driver. Initially, an application transfers a wave file stored in a hard disk 102 to a memory 104, in which data in the wave file, i.e. the wave data, is stored temporarily for further processing. The operation system then uses the driver to control a digital controller 106, and the digital controller 106 transfers the wave data stored in the memory 104 to a signal processor 108. The signal processors 108 finally output analog audio signals to a speaker 110 for sound play. The memory 104 can not only accept wave files stored in the hard disk 102, but also wave files from a network or an external audio source.
FIG. 2 depicts, in a flow chart, the conventional method in which streaming data is transmitted. Referring to FIGS. 1 and 2, in step 202, an operating system determines whether streaming data is transmitted. If there are streaming data being transmitted, then proceed to step 204, otherwise the procedure ends. In step 204, the operating system transfers the streaming data stored in the hard disk 102 into the memory 104. Next, in step 206, the driver initiates the digital controller 106 to transfer the streaming data stored in the memory 104 into the signal processor 108. Then, in step 208, the digital controller 106 determines whether the streaming data has been transmitted completely. If not, the transmission procedure returns to step 206 and continues the data transfer. On the other hand, if the transmission is deemed to be complete, then proceed to step 210 to send an interrupt to the driver to acknowledge the completion of the streaming data transmission, and then return to step 202.
The transmission procedure from the memory 104 to the signal processor 108 is further discussed below. At step 210, after the interrupt is sent to the digital controller 106 to signal the completion of the data transfer, the procedure returns to step 202. The digital controller 106 is again ready to read data. Meanwhile, intermission of streaming data may occur if the digital controller 106 does not transmit data to the signal processor 108. As a result, the audio signal cannot be real-time transmitted to the speakers 110 for playback, which yields xe2x80x9cbrokenxe2x80x9d and xe2x80x9cchoppyxe2x80x9d audio sounds that diminishes the listening pleasure for the user.
Accordingly, there is existing an intermission period between that a first streaming data transmission is finished and that a second streaming data begins to be transmitted. For example, the time for completing respective audio streaming data requires about 10 ms, and 0.1 ms for the intermission period which is 1% of the time period of each data transmission. Therefore, noise occurs during playing sound.
Conventionally, a first in first out (FIFO) register provided within the digital controller 106 is used to alleviate the intermission of streaming data problem. The FIFO register is used to temporarily store data which the digital controller 106 sequentially read from the memory 104. The data in the FIFO register is then popped to the signal processor 108. In this way, the digital controller 106 can still pop the streaming data stored in the FIFO register to the signal processor 108 during the intermission period, as long as the size of the FIFO register is large enough. However, if the FIFO register size is not large enough or the intermission period is too long, the streaming data still do not appear in real time. Furthermore, lots of logic gates are required for the FIFO register in the hardware design of the digital controller 106.
It is an objective of the present invention to provide a method and device for solving intermission of streaming data. The present invention alters the algorithm of the driver and the hardware design of the digital controller to provide excellent results in playing audio or video data without interruption. As a result, not only is hardware space and cost minimized, but the system is much more stable.
According to the objective of the present invention, it provides a method for solving intermission of streaming data. A digital controller is used to transmit streaming data stored in a storage unit. The digital controller includes a base recording unit and a trigger recorder. The method comprising steps of: (a) writing an initial address of a streaming data to the base recording unit when the streaming data is being transmitted; (b) changing a content value of the trigger recorder, and proceeding to the step (a) and a step (c) simultaneously; (c) transmitting a corresponding streaming data according to one of the initial addresses stored in the base recording unit by the digital controller; and (d) proceeding to the step (c) when the trigger recorder indicates that there are data remained to be transmitted.
It is to be understood that both the foregoing general description and the following detailed description are exemplary, and are intended to provide further explanation of the invention as claimed.